import request from '@/utils/request/index.js'
export default {
	
	/**上传动态时新增标签
	 * @param {Object} tagName
	 */
	saveTag(tagName){
		return request.request({
			url: '/h5/noctag/save',
			method: 'post',
			data: {
				tagName:tagName,
			},
		})
	},
	/**上传动态
	 * @param {Object} news
	 */
	uploadNews(news){
		return request.request({
			url:'/h5/nocnews/uploadNews',
			method: 'post',
			data:news,
			
		})
	},
	/**
	 * 获取推荐标签
	 */
	getRecomTagList(){
		return request.request({
			url:'/h5/noctag/list',
			method: 'post',
			data:{
				recomFlag: 1,
				page: 1,
				limit: 8
			}
		})
	},
	
	/**新增编辑流程
	 * @param {Object} id
	 */
	newsContent(id){
		return request.request({
			url:'/h5/nocnews/newsContent?id='+ id,
			method: 'get',
		})
	},
	/**更新动态
	 * @param {Object} id
	 * @param {Object} news
	 */
	updateNews(id,news){
		return request.request({
			url:'/h5/nocnews/updateNews?id='+ id ,
			method: 'post',
			data: news
		})
	},
	
}
